package cn.itsource.ymcc.feign;

import cn.itsource.ymcc.feign.fallback.CourseFeignFallbackFactory;
import cn.itsource.ymcc.result.JsonResult;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

@FeignClient(value = "service-course",fallbackFactory = CourseFeignFallbackFactory.class)
public interface CourseFeign {
    @GetMapping("/courseUserLearn/selectRecord/{courseId}/{loginId}")
    public JsonResult selectRecord(@PathVariable("courseId")Long courseId,@PathVariable("loginId")Long loginId);

    @PostMapping("/course/getCourseByIds")
    public JsonResult getCourseByIds(@RequestBody List<Long> ids);
}
